import java.util.StringJoiner;

public class joner {
    public static void main(String[] args) {
        //1.创建对象
        StringJoiner sj = new StringJoiner("---");
        //2.添加功能
        sj.add("adc").add("def").add("ghi");
        System.out.println(sj);


        //3.创建对象2
        //delimiter: 分隔符
        //prefix: 前缀
        //suffix: 后缀
        StringJoiner sj2 = new StringJoiner(" ", "[", "]");
        //4.添加功能
        sj2.add("adc").add("def").add("ghi");
        System.out.println(sj2);

    }

}
